package com.doeis.uwork.entity;

import com.doeis.minaserver.dao.User;
import com.voland.core.annotation.Associate;
import com.voland.core.annotation.Table;
import com.voland.core.db.Entity;
import com.voland.core.validator.NotNull;

@Table(name = "template")
public class Template extends Entity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String id;
	@NotNull(message = "定制名称不能为空！")
	private String name;
	private String user_id;
	private Integer sort_num;
	private Boolean is_top;
	private String from_share_id;//模板来自的共享ID
	private Boolean shared;
	@Associate
	private Integer type; 
	private Integer version_num;
	
	private Integer skin;

	@Associate(fk = "user_id")
	private User user;

	public Integer getSkin() {
		return skin;
	}
	public void setSkin(Integer skin) {
		this.skin = skin;
	}
	public Boolean getShared() {
		return shared;
	}
	public void setShared(Boolean shared) {
		this.shared = shared;
	}
	
	
	public String getFrom_share_id() {
		return from_share_id;
	}

	public void setFrom_share_id(String from_share_id) {
		this.from_share_id = from_share_id;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUser_id() {
		return user_id;
	}

	public void setUser_id(String user_id) {
		this.user_id = user_id;
	}

	public Integer getSort_num() {
		return sort_num;
	}

	public void setSort_num(Integer sort_num) {
		this.sort_num = sort_num;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	

	public Boolean getIs_top() {
		return is_top;
	}

	public void setIs_top(Boolean is_top) {
		this.is_top = is_top;
	}

	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	
	public Integer getVersion_num() {
		return version_num;
	}
	public void setVersion_num(Integer version_num) {
		this.version_num = version_num;
	}
	@Override
	public String toString() {
		return "Template [id=" + id + ", name=" + name + ", user_id=" + user_id
				+ ", sort_num=" + sort_num + ", is_top=" + is_top
				+ ", from_share_id=" + from_share_id + ", shared=" + shared
				+ ", type=" + type + ", version_num=" + version_num + ", user="
				+ user + "]";
	}
	
}